/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page, TreeDataModel } from '../../model/baseModel';

const { adminPath } = useGlobSetting();

export interface QueslibRes extends BasicModel<QueslibRes> {
  ccontent?: string; // 内容
  resStatus?: string; // 状态
  createTime?: string; // 创建日期
  updateTime?: string; // 更新日期
  auditDate?: string; // 确认日期
  auditBy?: string; // 确认人
  cversion?: string; //版本
}

export const queslibResList = (params?: QueslibRes | any) =>
  defHttp.get<QueslibRes>({ url: adminPath + '/queslib/res/queslibRes/list', params });

export const queslibResListData = (params?: QueslibRes | any) =>
  defHttp.post<Page<QueslibRes>>({ url: adminPath + '/queslib/res/queslibRes/listData', params });

export const queslibResForm = (params?: QueslibRes | any) =>
  defHttp.get<QueslibRes>({ url: adminPath + '/queslib/res/queslibRes/form', params });

export const queslibResSave = (params?: any, data?: QueslibRes | any) =>
  defHttp.postJson<QueslibRes>({ url: adminPath + '/queslib/res/queslibRes/save', params, data });

export const queslibResDelete = (params?: QueslibRes | any) =>
  defHttp.get<QueslibRes>({ url: adminPath + '/queslib/res/queslibRes/delete', params });

export const queslibResConfirm = (params?: any, data?: QueslibRes | any) =>
  defHttp.postJson<QueslibRes>({
    url: adminPath + '/queslib/res/queslibRes/confirm',
    params,
    data,
  });
export const resTreeData = (params?: any) =>
  defHttp.get<TreeDataModel[]>({ url: adminPath + '/queslib/res/queslibRes/treeData', params });
